import HTMLTestRunner_PY3,yagmail
class Tools():
    # 测试报告
    def Report(self):
        report=HTMLTestRunner_PY3.HTMLTestRunner(open('curse.html','wb'),
                                                 title='测试报告',
                                                 description='共执行3条测试用例')
        return report
    # 发送邮件
    def Mail(self):
        mail=yagmail.SMTP(user='2793453598@qq.com',password='fauupyapcthmdehc',host='smtp.qq.com',port=465)
        mail.send(to='2793453598@qq.com',subject='测试报告',contents=['curse.html','在线课程管理测试报告'])
        print('发送成功')
        mail.close()